<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <!-- <meta name="viewport" content="width=device-width,initial-scale=1.0"> -->
  <title>Morphling v4.0</title>
  <meta name="referrer" content="no-referrer">
  <!-- <link rel="stylesheet" href="https://morphling.jcmasz.com/element/index.css"> -->
  <script src="https://morphlingv4.jcmasz.com/js/vue@2.6.12"></script>
  <script src="https://morphlingv4.jcmasz.com/js/axios.min.js"></script>
  <script src="https://morphlingv4.jcmasz.com/js/index.js"></script>
  <script src="https://morphlingv4.jcmasz.com/js/xlsx.core.min.js"></script>
  <script src="https://morphlingv4.jcmasz.com/js/echarts.min.js"></script>
  <script src="https://morphlingv4.jcmasz.com/js/echarts-wordcloud.min.js"></script>
  <script src="https://morphlingv4.jcmasz.com/js/aliyun-oss-sdk-6.1.1.min.js"></script>
  <script src="https://morphlingv4.jcmasz.com/js/md5.min.js"></script>
  <script src="https://morphlingv4.jcmasz.com/js/tos.umd.production.min.js"></script>
</head>

<body>
  <div id="app"></div>
  <!-- built files will be auto injected -->
</body>
<script>
  Vue.filter('keepLastTwo', function (value) {
    return value.substr(-2)
  })
  Vue.filter('keepTwoNumS', function (value) {
    return value.slice(0, 2)
  })
  Vue.filter('keepOneNumS', function (value) {
    return value.slice(0, 1)
  })
  Vue.filter('keepTwoNumT', function (value) {
    value = Number(value)
    return value.toFixed(2)
  })
  Vue.filter('keepTwoNum', function (value) {
    value = Number(value) * 100
    return value.toFixed(2)
  })

  Vue.filter('keepNone', function (value) {
    value = Number(value)
    return value.toFixed(0)
  })

  Vue.filter('unitText', function (value) {
    let num = Number(value) / 100000000
    let text = ''
    if (num > 1) {
      text = (Number(value) / 100000000).toFixed(2) + '亿'
    } else {
      text = (Number(value) / 10000).toFixed(2) + '万'
    }
    return text
  })

  Vue.filter('unitWan', function (value) {
    let num = Number(value) / 10000
    let text = ''
    if (num >= 1) {
      text = (Number(value) / 10000).toFixed(1) + 'w'
    } else {
      text = (Number(value))
    }
    return text
  })

  Vue.directive('focus', {
    inserted: function (el) {
      el.focus()
      el.querySelector('input').focus()
    }
  })
  Vue.directive('textarea', {
    inserted: function (el) {
      el.focus()
      el.querySelector('textarea').focus()
    }
  })

</script>

</html>
